<?php 
class AssetManager extends CAssetManager {
	private $_baseAsset ;
	
	/**
	 * 发布基本资源目录,默认返回application.ui.static核心样式文件
	 * @param $path 路径别名
	 */
	public function setBaseAsset($path = 'views.layouts.static', $hashByName = false, $level = -1, $forceCopy = YII_DEBUG){
		return $this->_baseAsset = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias($path), $hashByName, $level, $forceCopy);
	}
	
	/**
	 * 获取基本资源目录
	 */
	public function getBaseAsset(){
		if(!$this->_baseAsset)
			$this->setBaseAsset();
		return $this->_baseAsset;
	}
}
?>